<?php
/*
* Copyright (c) 2011 David Pesta, http://www.simplemvc.org
* Licensed under the MIT License.
* You should have received a copy of the MIT License along with this program.
* If not, see http://www.opensource.org/licenses/mit-license.php
*/
?>

<? if( $success ): ?>
	Your password was emailed to <?= $email ?>. Be sure to check your spam folder if you do not receive it in your inbox.<br>
	<br>
	<!-- TODO: Override in the class where the user is taken back to, default is /login !-->
	<a href="/login/email/<?= str_replace( '"', '', $email ) ?>">Back to Login</a>
<? else: ?>
	<form method="POST">
		<? if( ! empty( $messages ) ): ?>
			Problem Recovering Password:<br>
			<? foreach( $messages as $message ): ?>
				&bull; <?= $message ?><br>
			<? endforeach; ?>
			<br>
		<? endif; ?>
		
		Please enter the email address of the account you wish to recover the password for:<br>
		<input type="textbox" name="email" value="<?= $email ?>"><br>
		<input type="submit" value="Recover Password">
	</form>
<? endif; ?>
